function test6( )
%TEST4 Summary of this function goes here
%   Detailed explanation goes here

    W = imread('../TestImg/storm.png');
    W = double(W(:,:,1));
%     S = [2,4;6,8];
    S = fspecial('motion');

    H = conv2(W,S)./sum(S(:));
    
    
    WRec = MyDeconv2D(H,S,size(W,1),size(W,2),500);
    
    figure(1); 
    subplot(2,2,1);
    imshow(ZeroToOne(W));
    disp('W');
    %disp(W);
    
    subplot(2,2,2);
    imshow(ZeroToOne(S));
    disp('S');
    %disp(S);
    
    subplot(2,2,3);
    imshow(ZeroToOne(H));
    disp('H');
%     disp(H);
    
    subplot(2,2,4);
    imshow(ZeroToOne(WRec));
    disp('WRec');
%     disp(WRec);
    
end

function y = ZeroToOne(x)
    
    y = x-min(x(:));
    y = y./max(y(:));

end

